package com.lagou.resume.util;

import org.I0Itec.zkclient.ZkClient;

/**
 * @autor yzh
 * @date 2020/4/6 12:46
 */
public class ZookeeperUtil {

    /**
     * zookeeper地址
     */
    private static String ZK_HOST = "47.105.185.180:2181";

    /**
     * 服务端信息根节点
     */
    public static final String ROOT_PATH = "/dbconfig";

    private static ZkClient zkClient;

    private ZookeeperUtil() {

    }

    public static ZkClient getZkClient() {
        if(zkClient == null) {
            zkClient = new ZkClient(ZK_HOST, 50000);
        }
        return zkClient;
    }

}
